function changetabs(temp) {
	if (temp != currenttab) {
		currenttab = temp;
		currentpage = 1;
		pages = 1;

		ldata = null;
		if(temp==0)
		status =28;
		if(temp==1)
			status=40;
		$pagecontainer.empty();
		$ul.empty();
		$pagecontainer = $('#pagecontainer' + temp);
		$ul = $('#page' + temp);

		init();

	}
}

function getdiffstatuscontent(url, parameters, $pagecontainer) {
				myAjax(url, parameters, function(data) {
					ldata = data;
					if(status==28)
						{
						drawDiffStatusContent($pagecontainer, data, parameters);
						
					$.each(ldata, function(i, item) {
						if (item.applyed!=0)
							myAlert('提示','您的"'+item.title+'"工作有'+item.applyed+"人报名，快去看看！");
					});
						}
					if(status==40)
						{
						drawDiffStatusContentend($pagecontainer, data, parameters);
						}
				});

			}
	function further(className, id) {
		var index = id.replace(className, "");
		if (className == 'pay') {
			/*opFunction(domain + '/deletePtJob.do', {
				'id' : ldata[index].id
			}, 'ERIndex.jsp')*/
			alert('pay manager');
		}
		if (className == 'cancel') {
			opFunction(domain + '/changeJobStatus.do', {
				status : 40,
				'ptid' : ldata[index].id
			}, 'JobWorking.jsp')
		}
		if (className == 'ReqManager') {
			//window.location.href=domain+'/ReqManager.do?ptjobid='+ldata[index].id;
			myPost(domain + '/ReqManager.jsp', {
				'jobstatus':status,
				'ptjobid' : ldata[index].id,
				'neednum' : ldata[index].personnum
		});
		}
	}

	function opFunction(url, data, location) {

		myAjax(url, data, function(msg) {
			window.location.href = location;
		});
	}
	function changepage(a) {
		if (a.innerHTML === '第一页')
			currentpage = 1;
		else if (a.innerHTML === '最末页')
			currentpage = pages;
		else if (a.innerHTML === '上一页')
			currentpage -= 1;
		else if (a.innerHTML === '下一页')
			currentpage += 1;
		else
			currentpage = a.innerHTML;
		$ul.empty();
		drawPages($ul, currentpage, pages, 10);
		$pagecontainer.empty();
		getdiffstatuscontent(domain + '/getDiffStatusPtJob.do', {
			'page' : currentpage,
			'status' : 28
		}, $pagecontainer);
		return false;
	}
